import request from '@/utils/request'

export function getPosts(query){
    return request({
        url:'/post/post/list',
        method:'get',
        params:query
    })
}

export function getPostByType(type){
    return request({
        url:'/post/post/type/list?type='+type,
        method:'get'
    })
}
export function setJob(eid,jid){
    return request({
        url:'/post/post/manager/set?experimentId='+eid+'&jobId='+jid,
        method:'get'
    })
}
//获取所有分配给内部实验管理员的实验
export function getManagerList(query){
    return request({
        url:'/post/post/manager/list',
        method:'get',
        params:query
    })
}

export function selectTypes(id){
    return request({
        url:'/post/post/type?jobId='+id,
        method:'get'
    })
}
export function selectExceptions(query){
    return request({
        url:'/post/post/experiment',
        method:'get',
        params:query
    })
}
export function topExperiment(data){
    return request({
        url:'/post/post/top',
        method:'post',
        data:data
    })
}
export function cancelTopExperiment(ids){
    return request({
        url:'/post/post/canceltop?ids='+ids,
        method:'get'
    })
}
export function finishExperiment(data){
    return request({
        url:'/post/post/finish',
        method:'post',
        data:data
    })
}
